package ar.utn.jess.domain;

import ar.utn.jess.annotation.Entity;
import ar.utn.jess.annotation.Field;
import ar.utn.jess.common.AbstractEntity;
import ar.utn.jess.common.SelectorData;

@Entity(tableName="barrio")
public class Barrio extends AbstractEntity{

	private String nombre;
	
	public Barrio() {
		
	}
	
	
	
	//-------------------------------------------------------//


	@Override
	protected String getSqlForSelector(SelectorData selectorData) {
		String query = "select id, nombre from barrio ";
		
		return query;
	}


	@Override
	protected String getSqlForAutocompleteOptions(String term) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	protected String getSqlForOption(String where) {
		String query = "select id, nombre from barrio " + where;
		
		return query;
	}

	//--------------------------------------------------------------//

	@Field(columnName="nombre")
	public String getNombre() {
		return nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}
}
